package ooad.gof.observer;

public class ConcreteObserver implements AbstractObserver{
	private String name;
	public ConcreteObserver(String name){
		this.name = name;
	}
	@Override
	public void update(Subject subject, Object arg) {
		ConcreteSubject cs = (ConcreteSubject)subject;
		System.out.println(this.name+":观察的对象变化了，现在是"+cs.getArg());		
	}
}
